#include<bits/stdc++.h>
using namespace std;
int main(){
	freopen("detect.in","r",stdin);
	freopen("detect.out","w",stdout);
	int n[100001],m[100001],L[1000001],V[1001];
	int T[21];
	cin>>n[]100001]>>m[100001];
	cin>>L[1000001]>>V[1001];
	int p;
	cin>>p;
	int d,v,a,v1;
	int k,r;
	for(int i;i<=n[100001];i++){
		cin>>d>>a>>v;
		v1^2=v^2+2*a*s;
		if(v1<V[1001]){
			int n1=0;
			n1++;
			m[100001]--;
			}
		r=m;
		k=n1;
		}
	cout<<k<<r<<end1;
	return 0;
	}
